package bma.shop.dao.hibernate;

import java.util.Collection;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import bma.shop.dao.ProductDao;
import bma.shop.domain.Product;

public class HibernateProductDao extends HibernateDaoSupport implements ProductDao {

	public Collection<Product> loadAllProducts() {
		return getHibernateTemplate().loadAll(Product.class);
	}

	public Product saveProduct(Product p) {
		getHibernateTemplate().saveOrUpdate(p);
		return p;
	}
	
	

}
